﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;

namespace Dock
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Form2 f2 = new Form2();
            f2.Width = 200;
            f2.Show(this.dockPanel1);
            f2.DockState = DockState.DockLeft;
            f2.DockTo(this.dockPanel1, DockStyle.Left);

            Form3 f3 = new Form3();
            f3.Show(this.dockPanel1);
            f3.DockTo(this.dockPanel1, DockStyle.Fill);
        }

        private void dockPanel1_ActiveContentChanged(object sender, EventArgs e)
        {

        }

        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Dispose();
            Application.Exit();
        }
    }
}
